<template>
	<NConfigProvider class="h-full" :theme="theme" :theme-overrides="themeOverrides" :locale="language">
		<NaiveProvider>
			<RouterView />
		</NaiveProvider>
	</NConfigProvider>
</template>

<script setup lang="ts">
import { NConfigProvider } from 'naive-ui'
import { NaiveProvider } from '@/components/common'
import { useTheme } from '@/hooks/useTheme'
import { useLanguage } from '@/hooks/useLanguage'

const { theme, themeOverrides } = useTheme()
const { language } = useLanguage()
// 禁止右键和F12
document.oncontextmenu = function () {
	return false
}
document.addEventListener("keydown", function (e) {
	if (e.key === "F12" || e.ctrlKey && e.shiftKey && e.key === "I") { //禁用F12和Ctrl+Shift+I
		e.preventDefault();
	}
});
</script>
